
	/********************************************************/
	/*                                                      */
	/*                                                      */
	/*         Copyright (C), 1993  SEIKO EPSON Corp.       */
	/*         ALL RIGHTS RESERVED                          */
	/*                                                      */
	/*                                                      */
	/*  file name : vprintf.c                               */
	/*                                                      */
	/*  Revision history                                    */
	/*      93/12/17    first release       K.Shinozuka     */
    	/*      97/3/17	    modified	    	T.Katahira	*/
    	/*		change function declaration	    	*/
    	/*				to the ANSI style   	*/
	/*                                                      */
	/********************************************************/

#ifdef    UNIX
#include    "stdio.h"
#include    "stdarg.h"
#include    "smcvals.h"
#else
#include    <stdio.h>
#include    <stdarg.h>
#include    <smcvals.h>
#endif

extern int _doprint( /* _CODETYP, FILE *, unsigned char *, va_list */ );


#if defined( UNIX ) && !defined( ANSI )  /* for not ANSI C compiler */
vprintf( va_alist )
va_dcl

#else
int
vprintf( const char *cFmtP, va_list tdArgP )
/*	const char    *cFmtP;              pointer to the format string */
/*  va_list tdArgP;              pointer to the list of the variable numbers of argument */

#endif

	/********************************************************/
	/*                                                      */
	/*  The vprintf function writes output to standard      */
	/*  output.  The writing is controlled by output format */
	/*  ( cFmtP ), which specifies how subsequent arguments */
	/*  are converted for output.                           */
	/*  The format is composed of zero or more directives;  */
	/*  ordinary single byte characters ( not % ), which    */
	/*  are copied to the output stream; and conversion     */
	/*  specifications, each of which is started with the   */
	/*  character %.                                        */
	/*  About the specification of the conversion, please   */
	/*  read READMEstdio.                                   */
	/*  The vprintf function returns when the end of the    */
	/*  format string is reached or output error occurs.    */
	/*  If the format is exhausted while arguments remain,  */
	/*  the excess arguments are evaluated but not          */
	/*  converted.                                          */
	/*                                                      */
	/*  The vprintf doesn't have following functions, which */
	/*  prescribed in ANSI.                                 */
	/*                                                      */
	/*     1) p conversion                                  */
	/*     2) n conversion                                  */
	/*     3) g,G conversion                                */
	/*          g or G is treated as the same conversion as */
	/*          e or E respectively in this function.       */
	/*     4) treatment with long double values             */
	/*        ( L option )                                  */
	/*     5) limitation of character in the format         */
	/*          ANSI allows to use multibyte character      */
	/*          sequence, but we limit it only single byte  */
	/*          characters.                                 */
	/*                                                      */
	/*  note: Effective precision of a floating point number*/
	/*        is DBL_DIG + 1.  This function adds '0' after */
	/*        effective figures, if the value of precision  */
	/*        specified is too big.                         */
	/*        (DBL_DIG is defined in float.h)               */
	/*                                                      */
	/*                                                      */
	/*      RETURN  except EOF  ... the number of characters*/
	/*                              transmitted             */
	/*              EOF         ... output error            */
	/*                                                      */
	/********************************************************/

    {

#if defined( UNIX ) && !defined( ANSI )
	 char    *cFmtP    ;          /* pointer to the format string */
	 va_list tdArgP    ;          /* pointer to the list of the variable numbers of argument */

	 va_start( tdArgP );
	 cFmtP = va_arg( tdArgP, char * );
	 tdArgP = *(va_list *)tdArgP;
#endif

	 return( _doprint( _STRM, stdout, cFmtP, tdArgP ) );  /* write output to stdout */
	}